import torch
from torch.autograd import Variable
import matplotlib.pyplot as plt
import numpy as np
from torch import nn
# import sys
# sys.path.append('D:\\大学学习\实验室\Deep_learning\deep_nn')

class nnet(nn.Module):
    def __init__(self,input_num,hidden_num1,hidden_num2,hidden_num3,output_num):
        super(nnet,self).__init__()
        self.layer1 = nn.Linear(input_num,hidden_num1)

        self.layer2 = nn.ReLU()

        self.layer3 = nn.Linear(hidden_num1,hidden_num2)

        self.layer4 = nn.Linear(hidden_num2,hidden_num3)

        self.layer5 = nn.Linear(hidden_num3,output_num)

    def fellow(self,x):
        x1 = self.layer1(x)
        x1 = self.layer2(x1)
        x2 = self.layer3(x1)
        x2 = self.layer2(x2)
        x3 = self.layer4(x2)
        x3 = self.layer2(x3)
        x4 = self.layer5(x3)
        return x4

test_net = nnet(784,400,200,100,10)
test_net.load_state_dict(torch.load('moudule_net.pth'))


